package wechat

import (
	"fmt"
)

// ErrFailedToOperateWechatOfficialAccountUserDB 错误类型：打开数据库失败
type ErrFailedToOperateWechatOfficialAccountUserDB struct {
	Action  string
	Message string
}

func (err ErrFailedToOperateWechatOfficialAccountUserDB) Error() string {
	return fmt.Sprintf("Failed to %v in WeChat Official Account DB: %v", err.Action, err.Message)
}

// ErrWechatOfficialAccountUserNotExist 错误类型：找不到对应的微信公众号用户
type ErrWechatOfficialAccountUserNotExist struct {
	AppID  string
	OpenID string
}

func (err ErrWechatOfficialAccountUserNotExist) Error() string {
	return fmt.Sprintf("WeChat Official Account User not found: AppID = %v, OpenID = %v", err.AppID, err.OpenID)
}
